<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>local-storage cross domain</title>
</head>
<body>
    <div>A域名页面存储localStorage值</div>
    <script>
        let Aval = {
	    name: 'Apage',
            size: 100
        };
        localStorage.setItem('setVal',JSON.stringify(Aval));
        window.parent.postMessage(localStorage.getItem('setVal'), 'http://localhost:8081');
    </script>
</body>
</html>